#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

int main() 
{
	int a[7][7];

	for(int i =0;i<7;i++)
	{
		a[i][0] = 1;
		a[i][i] = 1;
	}

	for (int i = 0; i < 7; i++)
	{
		for (int j = 1; j < i; j++)
		{
			a[i][j] = a[i - 1][j] + a[i - 1][j - 1];
		}
	}

	for (int i = 0; i < 7; i++)
	{
		for (int j = 0; j <= i; j++)
		{
			printf("%5d", a[i][j]);
		}
		printf("\n");
	}

	return 0;
}